In R, the Foundations of Multi-Dimensional Data rest on the principle that higher-order structures are not distinct storage types. Instead, they are atomic vectors or factors augmented by a dimension vector. By applying a dimension attribute using dim(), we transform a linear sequence into a k-way array, mapping a single memory index to a multi-coordinate system.
1. Metadata as Shape
The array() function acts as a constructor that wraps data (arrays, vectors, or factors) into a structure where the dim() attribute dictates how functions interpret the organization of elements.
2. Structural Transformation
The transition from 1D to ND occurs via assignment syntax: dim(z) <- c(3,5,100). This re-indexes the underlying data without changing its values.
3. Initializing State
Multi-dimensional structures are often instantiated with placeholders: Z <- array(0, c(3,4,2)) allocates a $3 \times 4 \times 2$ space, organizing 24 elements into a grid.